package cn.ehanghai.iot.common.security.constants;

import com.alibaba.fastjson.annotation.JSONField;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ReturnCode<T> {


    private String token;

    /**
     * 错误码
     */
    @JSONField(name = "error_code")
    private Integer errorCode;
    /**
     * 提示信息
     */
    private String reason;
    /**
     * 具体内容
     */
    private T result;


    public ReturnCode(Integer errorCode, String reason) {
        this.errorCode = errorCode;
        this.reason = reason;
    }


}
